/*
 * Copyright 2003-2006 (c) Live Media Pty Ltd. <argot@einet.com.au> 
 *
 * This software is licensed under the Argot Public License 
 * which may be found in the file LICENSE distributed 
 * with this software.
 *
 * More information about this license can be found at
 * http://www.einet.com.au/License
 * 
 * The Developer of this software is Live Media Pty Ltd,
 * PO Box 4591, Melbourne 3001, Australia.  The license is subject 
 * to the law of Victoria, Australia, and subject to exclusive 
 * jurisdiction of the Victorian courts.
 */


%ignore TypeLibrarySingleton::xxx;
%ignore TypeLibrarySingleton_lib;

%inline
%{
	typedef struct TypeLibrarySingleton
	{
		void* xxx;
	} TypeLibrarySingleton;
	
	type_library* TypeLibrarySingleton_lib = 0;
%}	


%extend TypeLibrarySingleton
{
	static type_library* getDefault()
	{
		if (!TypeLibrarySingleton_lib)
		{
			TypeLibrarySingleton_lib = calloc(1, sizeof(type_library));			
			type_library_init(TypeLibrarySingleton_lib);
			type_core_init(TypeLibrarySingleton_lib);
			dictionary_types_init(TypeLibrarySingleton_lib);
			type_bind_common(TypeLibrarySingleton_lib);
		}
		
		return TypeLibrarySingleton_lib;
	}
}